home *** CD-ROM | disk | FTP | other *** search
/ TestDrive Windows 1993 Fall / TestDrive Windows 1993 Fall.iso / photo / uninstal.bat < prev    next >
DOS Batch File  |  1993-08-18  |  3KB  |  113 lines

  1. @echo off
  2.  
  3. if exist ASK.EXE goto OK1
  4. echo  This batch program uninstalls PhotoFinish, and must be run
  5. echo  from your PhotoFinish directory.  Please change to that
  6. echo  directory first.  Then run UNINSTAL.BAT and specify the name
  7. echo  of your Windows directory.  Example:
  8. echo      uninstal c:\windows
  9. goto DONE
  10.  
  11. :OK1
  12.  
  13. if not exist %1\win.ini goto NOWIN
  14. goto OK2
  15. :NOWIN
  16. echo  This batch program uninstalls PhotoFinish.  You must specify
  17. echo  the name of your Windows directory.  Example:
  18. echo      uninstal c:\windows
  19. echo  Please try again.
  20. goto DONE
  21.  
  22. :OK2
  23.  
  24. rem  run me from different dir, so we can delete the entire directory.
  25. if %2a==a goto OK3
  26. goto OK4
  27. :OK3
  28. copy uninstal.bat %1 > NUL
  29. %1\uninstal %1 secret
  30.  
  31. :OK4
  32.  
  33. echo  ******************************************
  34. echo  *  WARNING   WARNING   WARNING   WARNING *
  35. echo  ******************************************
  36. echo  
  37. echo  This batch program uninstalls PhotoFinish.
  38. echo  It erases the ENTIRE PhotoFinish directory, and all product
  39. echo  subdirectories underneath the main PhotoFinish directory.
  40. echo  If you have any images or other files you would like to save,
  41. echo  you must copy them to another location before continuing.
  42. echo  
  43. echo  If you created any additional subdirectories under the main
  44. echo  PhotoFinish directory, or if files or directories are marked
  45. echo  as read-only, the final removal of the PhotoFinish directory
  46. echo  will not succeed.  In this event, the product files will have
  47. echo  been deleted, and you just need to manually remove the few
  48. echo  remaining items.
  49. echo  
  50. ask " Are you sure you want to erase PhotoFinish now?" Yes No
  51. if ERRORLEVEL 2 goto ABORT
  52. if ERRORLEVEL 1 goto DOIT
  53. goto ABORT
  54.  
  55. :DOIT
  56. ask " Are you really sure?" Yes No
  57. if ERRORLEVEL 2 goto ABORT
  58. if ERRORLEVEL 1 goto DOIT1
  59. goto ABORT
  60.  
  61. :DOIT1
  62. if exist PHOTO.EXE goto DOIT2
  63. echo  
  64. echo  Cannot find file PHOTO.EXE in the current directory.
  65. goto ABORT
  66.  
  67. :DOIT2
  68. if exist y goto DOIT3
  69. echo  
  70. echo  Cannot find file "y" in the current directory.
  71. goto ABORT
  72.  
  73. :DOIT3
  74.  
  75. rem  run ask in special mode to create cleanup batch file in windows dir
  76. ask rd %1 "echo  Removing PhotoFinish directory."
  77.  
  78. if not exist %1\system\browser.dll goto PROGRAM
  79. del %1\system\browser.dll >NUL
  80. del %1\system\jpeg_dll.dll >NUL
  81. del %1\system\zcapdll.dll >NUL
  82. :PROGRAM
  83. del images\*.* <y >NUL
  84. rd images >NUL
  85. del maps\*.* <y >NUL
  86. rd maps >NUL
  87. del palettes\*.* <y >NUL
  88. rd palettes >NUL
  89. del photolib\*.* <y >NUL
  90. rd photolib >NUL
  91. del textures\*.* <y >NUL
  92. rd textures >NUL
  93. del tiles\*.* <y >NUL
  94. rd tiles >NUL
  95. del papers\*.* <y >NUL
  96. rd papers
  97. del thumnail\*.* <y >NUL
  98. rd thumnail
  99. del *.* <y >NUL
  100.  
  101. echo  
  102. echo  PhotoFinish files have been erased.
  103. rem   now remove the product directory
  104. cd ..
  105. %1\rdzprod
  106. goto DONE
  107.  
  108. :ABORT
  109. echo  Exiting without erasing PhotoFinish.
  110.  
  111. :DONE
  112. echo on
  113.